﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using DG.Tweening;
using Path = DG.Tweening.Plugins.Core.PathCore.Path;

namespace linkouqs.Gamekit {

    public abstract class ThrowableObject : MonoBehaviour {
        
        public ParticleSystem brokenFX;
        
        public float throwDistance = 1f;
        [Range(0.02f, 2f)]
        public float throwDuraction = 0.3f;

        protected bool isThrowing;

        public virtual Path GetThrowPath() {
            return null;
        }

        public virtual void OnBroken() {

        }

        public virtual void OnThrow() {

        }

        protected virtual void OnTriggerEnter2D(Collider2D collision) {
            //if (!isThrowing) {
            //    return;
            //}
            //OnBroken();
        }
    }

}

